﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<FarmerStore.Models.RegisterModel>" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitleContent" runat="server">
    注册
</asp:Content>

<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
    <div id="submain">
        <h2>创建新帐户</h2>
        <p>
            使用下列表单注册新用户
        </p>
        <p>
            密码长度要求至少 <%= Html.Encode(ViewData["PasswordLength"]) %> 个字符。
        </p>

        <% using (Html.BeginForm()) { %>
            <%= Html.ValidationSummary(true, "账号没有创建成功.请更改错误，重新再试。") %>
            <div>
                <fieldset>
                    <legend>帐户信息</legend>
                
                    <div class="editor-label">
                        <%= Html.LabelFor(m => m.UserName) %>
                    </div>
                    <div class="editor-field">
                        <%= Html.TextBoxFor(m => m.UserName) %>
                        <%= Html.ValidationMessageFor(m => m.UserName) %>
                    </div>
                
                    <div class="editor-label">
                        <%= Html.LabelFor(m => m.Email) %>
                    </div>
                    <div class="editor-field">
                        <%= Html.TextBoxFor(m => m.Email) %>
                        <%= Html.ValidationMessageFor(m => m.Email) %>
                    </div>
                
                    <div class="editor-label">
                        <%= Html.LabelFor(m => m.Password) %>
                    </div>
                    <div class="editor-field">
                        <%= Html.PasswordFor(m => m.Password) %>
                        <%= Html.ValidationMessageFor(m => m.Password) %>
                    </div>
                
                    <div class="editor-label">
                        <%= Html.LabelFor(m => m.ConfirmPassword) %>
                    </div>
                    <div class="editor-field">
                        <%= Html.PasswordFor(m => m.ConfirmPassword) %>
                        <%= Html.ValidationMessageFor(m => m.ConfirmPassword) %>
                    </div>
                
                    <p>
                        <input type="submit" value="注册" />
                    </p>
                </fieldset>
            </div>
        <% } %>
    </div>
</asp:Content>
